D148945-revert
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 16 Dec 2025 11:47:30 +0000 (12:47 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 16 Dec 2025 11:47:30 +0000 (12:47 +0100)
Restore that for now, we're not GenToo ...

https://reviews.llvm.org/D148945
https://reviews.llvm.org/D122444

Gbp-Pq: Name D148945-revert.diff

clang/lib/Driver/ToolChains/Linux.cpp

index cee6e3e3ee0057b76f3e0b0de2c670b0d90fa276..cd40d1cca305aed087d3c79800bda532b7fe5807 100644 (file)
@@ -352,6 +352,13 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
 
   Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths);
 
+  // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs
+  // libc++.so in D.Dir+"/../lib/". Detect this path.
+  // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported.
+  if (StringRef(D.Dir).starts_with(SysRoot) &&
+      D.getVFS().exists(D.Dir + "/../lib/libc++.so"))
+    addPathIfExists(D, D.Dir + "/../lib", Paths);
+
   addPathIfExists(D, concat(SysRoot, "/lib"), Paths);
   addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths);
 }